package com.hhq.sso.protocol.oauth2.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import jakarta.persistence.Id;
import java.time.Instant;

/**
 * <p>
 * Description: 应用
 * </p>
 *
 * @author : xiaodong.yang
 * @date : 2024/6/14 18:24
 */
@Entity
@Table(name = "`app_client`")
@Setter
@Getter
public class Client {
    /**
     * 主键id
     */
    @Id
    private String id;
    /**
     * 客户端id ，授权登录使用
     */
    private String clientId;
    /**
     *
     */
    private Instant clientIdIssuedAt;
    /**
     * 客户端密钥
     */
    private String clientSecret;

    private Instant clientSecretExpiresAt;
    /**
     * 应用名称
     */
    private String clientName;
    /**
     * 授权方法
     */
    @Column(length = 1000, columnDefinition = "TEXT")
    private String clientAuthenticationMethods;
    /**
     * 授权类型
     */
    @Column(length = 1000, columnDefinition = "TEXT")
    private String authorizationGrantTypes;
    /**
     * 回调地址
     */
    @Column(length = 1000, columnDefinition = "TEXT")
    private String redirectUris;
    /**
     * 退出回调地址
     */
    @Column(length = 1000, columnDefinition = "TEXT")
    private String postLogoutRedirectUris;
    /**
     * 范围
     */
    @Column(length = 1000, columnDefinition = "TEXT")
    private String scopes;
    /**
     * 客户端设置
     */
    @Column(length = 2000, columnDefinition = "TEXT")
    private String clientSettings;
    /**
     * token设置
     */
    @Column(length = 2000, columnDefinition = "TEXT")
    private String tokenSettings;

}
